package com.mp.chart.data;


public class BollEntry extends Entry {


    private float high;
    private float low;
    private float open;
    private float close;


    public BollEntry(int xIndex, float high, float low, float open, float close, Object data) {
        super((high + low) / 2, xIndex, data);
        this.high = high;
        this.low = low;
        this.open = open;
        this.close = close;
    }


    public BollEntry(int xIndex, float high, float low, float open, float close) {
        this(xIndex, high, low, open, close, null);
    }


    public BollEntry copy() {

        BollEntry c = new BollEntry(getXIndex(), high, low, open,
                close, getData());

        return c;

    }

    public float getHigh() {
        return high;
    }

    public void setHigh(float high) {
        this.high = high;
    }

    public float getLow() {
        return low;
    }

    public void setLow(float low) {
        this.low = low;
    }

    public float getOpen() {
        return open;
    }

    public void setOpen(float open) {
        this.open = open;
    }

    public float getClose() {
        return close;
    }

    public void setClose(float close) {
        this.close = close;
    }


    @Override
    public String toString() {
        return String.format("高:%s,开:%s,低:%s,收:%s,SAR:%s", high, open, low, close);
    }
}
